﻿<!DOCTYPE html>
<html>

<head>
    <title>首页</title>
    <link href="myplus.ico" rel="shortcut icon" type="image/x-icon" />
    <link href="/style/home.css" rel="stylesheet" />
    <script src="/script/jquery.min.js"></script>
    <script src="/script/zui/js/zui.min.js"></script>
    <link href="/script/zui/css/zui.min.css" rel="stylesheet">
    <script src="/script/home.js"></script>
    <script src="/script/lib.js"></script>
    <script src="/script/leftmenu.js"></script>
    <style type="text/css">
        #HomeSearch {
            height: 26px;
            background: transparent;
            color: #fff;
        }

        .searchboxexample {
            background: hsla(0, 0%, 100%, .12);
        }

        .searchboxexample i {
            color: #fff;
        }

        .input-control-icon-right,
        .search-icon {
            height: 25px;
            line-height: 25px
        }

        .search-box-circle .input-control-icon-right,
        .search-box-circle>.form-control {
            border-radius: 0;
        }

        .home-alerts {
            display: block;
            position: absolute;
            margin-left: 10px;
        }
    </style>
</head>

<body>

    <div class="p-header">
        <div class="p-header-left">
            <div class="logo-info">
                <div class="logo">
                    管理后台
                </div>
            </div>
        </div>
        <div class="p-header-rigt">
            <div class="content-rigt-by">
                <!--左边部分 包括快捷菜单-->
                <div class="p-header-rl">
                    <div class="p-header-ll">
                        <div class="fast-btns">
                            <a id="fast-btn" class="fast-btn" data-toggle="tooltip" title="收缩左菜单"
                                data-placement="bottom">
                                <i class="icon icon-bars"></i>
                            </a>
                        </div>
                    </div>
                </div>
                <!--管理员信息 快捷菜单-->
                <div class="p-header-rr">
                    <div class="user-informs-list">
                        <div class="dropdown dropdown-hover user-informs">

                            <div class="user-logo">
                                <img src="/imgs/logo.jpg" />
                            </div>
                            <div class="user-names" data-toggle="dropdown">
                                <span class="user-name-dy">超级管理员</span>
                                <span class="caret"></span>
                            </div>
                            <ul class="dropdown-menu user-menu-list">
                                <li class="dropdown-header">快捷管理</li>
                                <li>
                                    <a href="/logpass.html" id="changepwd">
                                        <i class="icon icon-user"></i>
                                        <span>修改密码</span>
                                    </a>
                                </li>
                                <li class="divider"></li>
                                <li class="dropdown-header">系统</li>
                                <li>
                                    <a href="login.html">
                                        <i class="icon-signout"></i><span>退出管理</span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="p-content-body">
        <div class="content-wrapper">
            <div class="content-left">
                <!--左边快捷按钮-->
                <div class="mission-left"></div>
                <!--滑动菜单侧边栏-->
                <div class="scroll-sidebar">
                    <ul id="sys_menu" class="menu-ul"></ul>
                </div>
            </div>
            <div class="content-rigt">
                <div class="mission-board">
                    <!-- <div>
                        <a id="mission-home" class="mission-home active" data-top-menu-id="0" data-url="/Home/Default">
                            <i class="icon-home"></i>
                            <span>首页</span>
                        </a>
                    </div> -->
                    <div>
                        <ul id="top-menu" class="top-menu">
                            <li>
                                <a class="active" data-top-menu-id="1">
                                    <span class="tm-text">测试页面</span>
                                    <span data-top-menu="close">
                                        <i class="icon-times"></i>
                                    </span>
                                </a>
                            </li>
                            <li>
                                <a data-top-menu-id="1">
                                    <span class="tm-text">测试页面</span>
                                    <span data-top-menu="close">
                                        <i class="icon-times"></i>
                                    </span>
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div id="content-iframes" class="content-iframes">
                    <div class="content-iframe" data-right-iframe-id="0">
                        <iframe src=""></iframe>
                        onkeydown="if(event.keyCode==116) { mainFrame.location.reload();event.returnValue=false;
                        }"></iframe>
                    </div>
                </div>
            </div>
        </div>
    </div>

</body>

</html>
<script type="text/javascript">
    var menulist;
    $(function () {
        var Page = { Index: 1, Size: 99 };


        var myTreeData = [{
            title: '水果',
            url: 'http://openzui.com',
            open: true,
            children: [
                { title: '橘子' },
                {
                    title: '瓜',
                    children: [
                        { title: '西瓜' },
                        { title: '黄瓜' }
                    ]
                }
            ]
        }, {
            title: '坚果',
            children: [
                { title: '向日葵' },
                { title: '瓜子' }
            ]
        }, {
            title: '蔬菜'
        }];
        // $('#sys_menu').tree({ data: myTreeData });


        $("#SearchClear").click(function () {
            $("#HomeSearch").val("");
            $(".home-search-info").css("display", "none");
            $(".home-search-result").html("");
        });
        $("#HomeSearch").watch(function (value) {
            var html = '';
            $.each(menulist.Data, function (i, item) {
                var index = item.MenuName.indexOf(value);
                if (index >= 0 && item.Url != "") {
                    var template = '<a href="#" class="list-group-item menu-item" data-id="' + item.Id + '" data-url="' + item.Url + '">' + item.MenuName + '</a>';
                    html += template;
                }
            });
            if (html != "") {
                $(".home-search-result").html(html);
                $(".home-search-info").slideDown();
                $(".menu-item").click(function () {
                    pm.addtopiframe({ url: $(this).attr("data-url"), id: $(this).attr("data-id"), title: $(this).html() });
                    $(".home-search-info").css("display", "none");
                });
            }
        });
    });
    //监听搜索框内容改变
    $.fn.watch = function (callback) {
        return this.each(function () {
            //缓存以前的值  
            $.data(this, 'originVal', $(this).val());

            //event  
            $(this).on('keyup paste', function () {
                var originVal = $.data(this, 'originVal');
                var currentVal = $(this).val();

                if (originVal !== currentVal) {
                    $.data(this, 'originVal', $(this).val());
                    callback(currentVal);
                }
            });
        });
    }
</script>